home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / SWI / source / html / Makefile < prev    next >
Encoding:
Makefile  |  1997-10-28  |  2.2 KB  |  80 lines

  1. ################################################################
  2. # Makefile for the SWI-Prolog based latex2html converter
  3. #
  4. # Author: Jan Wielemaker
  5. # E-mail: jkan@swi.psy.uva.nl
  6. #
  7. # Free for personal usage and usage by academic institutions.
  8. # This package may be distributed freely.
  9. # This package may be modified if it is clearly indicated is concerns a
  10. # modified version, and the copyright and authorship notices are left
  11. # in place.
  12. #
  13. # Copyright (c) 1996, SWI, University of Amsterdam, all rights reserved
  14. ################################################################
  15.  
  16. PL=pl
  17. prefix=/staff/jan
  18. LIBDIR=$(prefix)/lib/latex2html
  19. BINDIR=$(prefix)/bin
  20.  
  21. CC=gcc
  22. LDSO=gcc
  23. LDSOFLAGS=-shared
  24. COFLAGS=-O2
  25. CDFLAGS=-D__SWI_PROLOG__
  26. CFLAGS=$(COFLAGS) $(CDFLAGS) -fpic
  27. INSTALL=install -c
  28. INSTALL_PROGRAM=$(INSTALL) -m 755
  29. INSTALL_DATA=$(INSTALL) -m 644
  30.  
  31. OBJ=    tex.o psfile.o
  32. LIB=    latex2html.pl latex.cmd pl.pl pl.cmd
  33.  
  34. all:
  35.     @echo "==============================================================="
  36.     @echo "Usage:"
  37.     @echo ""
  38.     @echo "$(MAKE) install        Install the package"
  39.     @echo "$(MAKE) html           Translate the documentation into HTML"
  40.     @echo "$(MAKE) dvi            Translate the documentation into DVI"
  41.     @echo "==============================================================="
  42.  
  43. install:
  44.     eval `$(PL) -dump-runtime-variables` && $(MAKE) ARCH=$$PLARCH HOME=$$PLBASE xinstall
  45.  
  46. xinstall:    tex.so latex2html
  47.     mkdir -p $(LIBDIR)/lib/$(ARCH)
  48.     $(INSTALL_DATA) tex.so          $(LIBDIR)/lib/$(ARCH)
  49.     $(INSTALL_PROGRAM) latex2html $(BINDIR)
  50.     for f in $(LIB); do $(INSTALL_DATA) $$f $(LIBDIR); done
  51.  
  52. latex2html:    Makefile latex2html.in
  53.     sed -e 's%@PL@%$(PL)%' -e 's%@LIBDIR@%$(LIBDIR)%' latex2html.in > $@
  54.     chmod 755 $@
  55.  
  56. tex.so:        $(OBJ)
  57.     $(LDSO) $(LDSOFLAGS) -o $@ $(OBJ)
  58.  
  59. ################################################################
  60. # Documentation
  61. ################################################################
  62.  
  63. html:    manual.tex
  64.     latex2html manual
  65.  
  66. dvi:    manual.tex
  67.     latex manual
  68.     latex manual
  69.  
  70. manual.tex:    manual.doc
  71.     ./doc2tex manual.doc > manual.tex
  72.  
  73. ################################################################
  74. # Cleanup
  75. ################################################################
  76.  
  77. clean:
  78.     rm -f *% *~ $(OBJ) tex.so latex2html
  79.  
  80.